﻿using ZeroSum.Domain.Repositories;
using ZeroSum.Plugin.Authorization.Datas.Aggregates.UserAggregate;

namespace ZeroSum.Plugin.Authorization.Datas.Services.Users;

public interface IUserBaseDomainService<TUser> where TUser : UserBase
{
    Task<TUser> AddAsync(TUser entity, CancellationToken cancellationToken = default);
    Task CheckUserUpdate(string? name, long id);
    Task UpdateAsync(TUser entity, CancellationToken cancellationToken = default);
    Task DeleteAsync(long id, CancellationToken cancellationToken = default);
    Task<TUser> GetByIdAsync(long id, CancellationToken cancellationToken = default);
    Task<TUser> FirstOrDefaultAsync(IQuery<TUser> query);
}